const buf1 = Buffer.alloc(10,"test Buffer!!");
console.log(buf1);
//<Buffer 74 65 73 74 20 42 75 66 66 65>
const buf2 = Buffer.allocUnsafe(20,"星空大海");
console.log(buf2);
//<Buffer 04 00 41 49 4e 47 5f 49 01 42 00 4c 00 00 00 00 18 96 6b 2f>
let buf3 = Buffer.from("晚安与你","utf-8");
console.log(buf3);
//<Buffer e6 99 9a e5 ae 89 e4 b8 8e e4 bd a0>
console.log(buf3.toString());